package week10;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;


public class Clinent {
	 public static void main(String[] args) throws ClassNotFoundException, SQLException{
    	   Class.forName("com.mysql.jdbc.Driver");
    	   String url="jdbc:mysql://localhost:3306/jsp";
    	   String username="root";
    	   String password="root";
    	   Connection conn=(Connection)DriverManager.getConnection(url,username,password);
    	   String insertSql="insert into td_student(age,name,id) values('21','zhangsan','11111')";
    	   Statement ps=conn.prepareStatement(insertSql);
    	   ps.executeUpdate(insertSql);
    	   System.out.print("OK");
       }
}
